package com.pet.order.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel(value="订单视图对象")
public class OrderVO {
    @ApiModelProperty(value = "订单id，唯一标识")
    private Long id;

    @ApiModelProperty(value = "订单状态 0-待支付 1-已支付 2-已发货 3-已收货 4-已评价 -1-取消订单 -2-申请退单 -3-管理员退单")
    private Integer status;

    @ApiModelProperty(value = "折扣比率(省略百分比)")
    private Integer discountRate;

    @ApiModelProperty(value = "订单商品列表")
    private List<OrderItemDetailVO> details;

    @ApiModelProperty(value = "订单总金额(分)")
    private Integer totalFee;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
}
